<?php

use Illuminate\Database\Seeder;

class PermissionsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
    	$permissions = [
    		[
    			'code' => 'project',
    			'parent_code' => 'top',
    			'name' => '项目设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'summary',
    			'parent_code' => 'top',
    			'name' => '统计查看',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'approval',
    			'parent_code' => 'top',
    			'name' => '审批通知',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'wage',
    			'parent_code' => 'top',
    			'name' => '工资卡',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'staff',
    			'parent_code' => 'project',
    			'name' => '项目人员设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'keyman',
    			'parent_code' => 'project',
    			'name' => '关键人物信息设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'training',
    			'parent_code' => 'project',
    			'name' => '岗位培训设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'disclosure',
    			'parent_code' => 'project',
    			'name' => '交接班设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'schedule_inspection',
    			'parent_code' => 'project',
    			'name' => '排班及巡检线路设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'genre',
    			'parent_code' => 'project',
    			'name' => '班次设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'demand',
    			'parent_code' => 'project',
    			'name' => '项目工时设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'attendance',
    			'parent_code' => 'project',
    			'name' => '考勤设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'node',
    			'parent_code' => 'project',
    			'name' => '巡检点位设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'line',
    			'parent_code' => 'project',
    			'name' => '巡检线路设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'station',
    			'parent_code' => 'project',
    			'name' => '岗位设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'station_report_setting',
    			'parent_code' => 'project',
    			'name' => '报岗设置',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'join_company',
    			'parent_code' => 'approval',
    			'name' => '加入公司审批',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'project_notify',
    			'parent_code' => 'approval',
    			'name' => '发送项目通知',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'company_notify',
    			'parent_code' => 'approval',
    			'name' => '发送公司通知',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'conference',
    			'parent_code' => 'approval',
    			'name' => '会议室审批',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'maintain',
    			'parent_code' => 'approval',
    			'name' => '维修处理',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'training_report',
    			'parent_code' => 'summary',
    			'name' => '培训统计',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'conference_report',
    			'parent_code' => 'summary',
    			'name' => '会议室统计',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'inspection_report',
    			'parent_code' => 'summary',
    			'name' => '巡检统计',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'station_report',
    			'parent_code' => 'summary',
    			'name' => '报岗统计',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'attendance_report',
    			'parent_code' => 'summary',
    			'name' => '考勤统计',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],[
    			'code' => 'wage_card_info',
    			'parent_code' => 'wage',
    			'name' => '工资卡信息接收权限',
    			'permissiontable_code' => '',
    			'permissiontable_type' => '',
			],
		];

    	DB::table('permissions')->insert($permissions);
    }
}
